|
|
|
|
|
|
|
Orthographic projections: |
|
|
|
|
|
|
|
|
Perspective projection into the X-Y-Z coordinate space with center of projection at (0, 0, 0, d): |
|
|
|
|
|
|
|
|
Converting from spherical coordinates (R, f, q) to Cartesian coordinates (x, y, z): |
|
|
|
 |
|
|
|
|
y = R * Sin(f)
x = R * Cos(f) * Cos(q)
z = R * Cos(f) * Sin(q) |
|
|
|
|
|
|
|
|
Converting from Cartesian coordinates (x, y, z) to spherical coordinates (R, f, q): |
|
|
|
 |
|
|
|
|
R = Sqr(x2 + y2 + z2) q = arctangent(z/x) f = arctangent(y/Sqr(x2 + z2)) |
|
|
|
|
|